home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F36168_strReverse.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-11-13  |  940 b   |  32 lines

  1. ∩╗┐<xsl:stylesheet version="1.0"
  2. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:str-reverse-func="f:str-reverse-func"
  4. exclude-result-prefixes="xsl str-reverse-func"
  5. >
  6.  
  7.    <xsl:import href="str-foldl.xsl"/>
  8.  
  9.    <str-reverse-func:str-reverse-func/>
  10.  
  11.     <xsl:template name="strReverse">
  12.       <xsl:param name="pStr"/>
  13.  
  14.       <xsl:variable name="vReverseFoldlFun" select="document('')/*/str-reverse-func:*[1]"/>
  15.  
  16.       <xsl:call-template name="str-foldl">
  17.         <xsl:with-param name="pFunc" select="$vReverseFoldlFun"/>
  18.         <xsl:with-param name="pStr" select="$pStr"/>
  19.         <xsl:with-param name="pA0" select="/.."/>
  20.       </xsl:call-template>
  21.     </xsl:template>
  22.  
  23.     <xsl:template match="str-reverse-func:*">
  24.          <xsl:param name="arg1" select="0"/>
  25.          <xsl:param name="arg2" select="0"/>
  26.  
  27.          <xsl:value-of select="concat($arg2,$arg1)"/>
  28.     </xsl:template>
  29.  
  30. </xsl:stylesheet>
  31.  
  32.